{extend name="default/users/base" /}
{block name="title"}待收货订单 - 买家中心{__block__}{/block}
{block name="css"}
{/block}
{block name="content"}
  <div class="wst-user-head"><span>待收货订单</span></div>
<!--   <div class='wst-user-tbar'>
     订单号：<input type='text'  class="u-query" id='orderNo'/> 
     店铺名称：<input type='text' class="u-query" id='shopName'/> 
     <button class="wst-sec-but u-btn" onclick="waitReceiveByPage()">查询</button>
  </div> -->
  <div class='wst-user-content'>
    <table class='wst-order-list'>
       <thead>
        <tr class='head'>
           <th>订单详情</th>
           <th width="115">支付方式/配送信息</th>
           <th>金额</th>
           <th width="110">操作</th>
        </tr>
     </thead>
     <tbody id='loadingBdy'>
         <tr id='loading' class='empty-row' style='display:none'>
              <td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
         </tr>
      </tbody>
        {php}foreach ($rs['data'] as $key => $value) { {/php}
        <tbody class="j-order-row">
          <tr class='empty-row'>
              <td colspan='4'>&nbsp;</td>
          </tr>
          <tr class='order-head'>
            <td colspan='4' align='right'>
              <div class='time'>{php} echo $value['createTime']; {/php}</div>
              <div class='orderno'>订单号：{php} echo $value['orderNo']; {/php}
              {php} if($value['orderSrc'] == 0){ {/php}<i class="order-pc"></i>{php} } {/php}
              {php} elseif($value['orderSrc'] == 1){ {/php}
                  <i class="order-wx"></i>
              {php} } {/php}
              {php} elseif($value['orderSrc'] == 2){ {/php}
                  <i class="order-mo"></i>
              {php} } {/php}
              {php} elseif($value['orderSrc'] == 3){ {/php}
                  <i class="order-app"></i>
              {php} } {/php}
              {php} elseif($value['orderSrc'] == 4){ {/php}
                  <i class="order-ios"></i>
              {php} } {/php}
              {php} elseif($value['orderSrc'] == 5){ {/php}
                  <i class="order-weapp"></i>
              {php} } {/php}
              {php} if($value['orderCodeTitle'] != ''){ {/php}
                  <span class="order_from">{php} echo $value['orderCodeTitle']; {/php}</span>
              {php} } {/php}
              </div>
              <div class='shop'>{php} echo $value['shopName']; {/php}</div>
              <div>
               {php} echo $value['status']; {/php}
               {php} if($value['orderStatus'] == 0){ {/php}
               &nbsp;|&nbsp;<a href='#none' onclick="javascript:cancel({php} echo $value['orderId'];{/php},1)">取消订单</a>
               {php} } {/php}
              </div>
            </td>
          </tr>
          {php} 
            $tmp = null;
            for($j = 0;$j < count($value['list']);$j++){
            $tmp = $value['list'][$j];
          {/php}
          <tr class='goods-box'>
            <td>
               <div class='goods-img'>
                <a href="{php} echo '/goods-'.$tmp['goodsId'].'.html';{/php}" target='_blank'>
                <img src="{php} echo '/'.$tmp['goodsImg'];{/php}"  class="gImg">
                </a>
               </div>
               <div class='goods-name'>
                 <div>{php} echo $tmp['goodsName']; {/php}</div>
                 <div>{php} echo $tmp['goodsSpecNames']; {/php}</div>
               </div>
               <div class='goods-extra'>{php} echo $tmp['goodsPrice']; {/php} x {php}echo $tmp['goodsNum'];{/php}</div>
            </td>
            {php} if($j==0){ {/php}
            <td rowspan="{{rows}}">
                <div>{php} echo $value['payTypeName']; {/php}</div>
                <div>{php} echo $value['deliverType']; {/php} </div>
            </td>
            <td rowspan="{{rows}}">
                <div>商品金额：¥{php} echo $value['goodsMoney']; {/php}</div>
                <div class='line'>运费：¥{php} echo $value['deliverMoney']; {/php}</div>
                <div>实付金额：¥{php} echo $value['realTotalMoney']; {/php}</div>
            </td>
            <td rowspan="{{rows}}">
                {php}
                    if($value['orderStatus'] == 0 && $value['noticeDeliver'] == 0){
                {/php}
                <div>
                  <a href='#none' onclick="javascript:noticeDeliver({php} echo $value['orderId'];{/php})">【提醒发货】</a>
                </div>
                {php}}{/php}
                {php}
                    if($value['orderStatus'] == 1){
                {/php}
                <div>
                <a href='#none' onclick="javascript:toReceive({php} echo $value['orderId'];{/php})">【确认收货】</a>
                </div>
                <div>
                <a href='#none' onclick="javascript:toReject({php} echo $value['orderId'];{/php})">【拒绝收货】</a>
                </div>
                {php}}{/php}
                <div><a href='#none' onclick="view({php} echo $value['orderId'];{/php},'waitReceive')">【订单详情】</a></div>
                {php}
                    if($value['isComplain'] != ''){
                {/php}
                <div><a href='#none' onclick="complain({php} echo $value['orderId'];{/php},'waitReceive')">【订单投诉】</a></div>
                {php}}{/php}
            </td>
            {php} } {/php}
          </tr>
          {php} } {/php}
          <tr>
          <td colspan="4">
            {php}
                if($value['orderRemarks'] != '' ){
            {/php}
               <div class="order_remaker">【我的留言】{php}echo $value['orderRemarks'];{/php}</div>
            {php} } {/php}
          </td>
          </tr>
        </tbody>
        {php} } {/php}
<!--        <script id="tblist" type="text/html">

       </script> -->
       <tr class='empty-row'>
            <td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'>&nbsp;</td>
       </tr>
    </table>
  </div>
{/block}
{block name="js"}
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
<script>
// $(function(){
//  waitReceiveByPage({$p});
// })
</script>
{/block}
